#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

#include "caloption.h"

QT_BEGIN_NAMESPACE
class QMenu;
class QCalendarWidget;
class QGridLayout;
class QGroupBox;
class QLabel;
QT_END_NAMESPACE

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
private:
    Ui::MainWindow *ui;


    bool isCalViewEnable;
    bool isOptViewEnable;
    bool isFindViewEnable;

    //variance added by user ;
    QMenu *viewMenu;
    QMenu *optionMenu;
    QMenu *helpMenu;

    QAction *viewYearAct;
    QAction *viewMonthAct;
    QAction *optionAct;
    QAction *viewSeekAct;

    CalOption *calOption;

    QWidget *windowView;
    QCalendarWidget *calendar;
    QGridLayout *windowViewLayout;
    QGroupBox *calViewGroup;
    QGridLayout *calViewLayout;
    QLabel *testLabel;

    //func added by user;
    void createMenu();
    void createCalView();
    void createOption();
    void createActions();
    void writeSetting();
    void readSetting();
    void switch2YearView();
    void switch2MonthView();
    void createWindowView();

private slots:
    void switchView();
    void findView();
};

#endif // MAINWINDOW_H
